
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>丹尼克尔后台登录</title><meta name="keywords" content="丹尼克尔后台登录" /><meta name="description" content="丹尼克尔后台登录" />

    <link href="__CSS__/bootstrap.min.css" rel="stylesheet">
    <link href="__FONTS__/css/font-awesome.css" rel="stylesheet">

    <link href="__CSS__/animate.css" rel="stylesheet">
    <link href="__CSS__/style.css" rel="stylesheet">

</head>

<body class="gray-bg">

    <div class="middle-box text-center loginscreen animated fadeInDown">
        <div>
            <div>

                <h1 class="logo-name">DANIKOR</h1>

            </div>
            <h3>欢迎登录danikor后台</h3>
            <p>
            </p>
            <p>创新让智造融入生活</p>
            <form class="m-t login" role="form" >
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="用户名" required="" name="name">
                </div>
                <div class="form-group">
                    <input type="password" class="form-control" placeholder="密码" required="" name="password">
                </div>
                <button type="button" class="btn btn-primary block full-width m-b login-btn">登录</button>
            </form>
            <p class="m-t"> <small>Copyright</strong> 丹尼克尔 &copy; 2019</small> </p>
        </div>
    </div>

    <!-- Mainly scripts -->
    <script src="__JS__/jquery-3.1.1.min.js"></script>
    <script src="__JS__/bootstrap.min.js"></script>
    <script src="__JS__/layer.js"></script>
    <script>
       $(function(){
            $('.login-btn').click(function(){
                var _name = $('input[name="name"]').val(),
                    _password = $('input[name="password"]').val();
                var _data = $('.login').serialize();
                $.post("{:url('Login/login')}",{name:_name,pw:_password},function(result){
                    if (result['code'] == 200){
                        layer.msg('登录成功', {icon: 16,time: 1000,shade : [0.5 , '#000' , true],end:function(){location.href="{:url('index/index')}";}});
                    }else{
                        alert(result['message']);
                    }
                })
            })
       })
    </script>
    
</body>

</html>
